/**
 * 公共api
 */

import { post, get, baseURL } from '@/utils/request'
/**
 * 获取赛事信息
 */
export const eventData = (id) => get('/h5/event/getByIdInfo?id='+ id)
/**
 * 查看更多赛事公告/新闻/图集  type: 1公告, 2新闻, 3图集
 */
export const getByMore = (params) => get(`/h5/event/getByMore?id=${params.id}&type=${params.type}`)
/**
 * 获取报名商品列表
 */
export const getEvtGoods = (data) => post(`/h5/ProductCategory/product/list`, data)

/**
 * 赛事报名
 */
export const createEvtOrder = (data) => post(`/h5/event/createEvtOrder`, data)
  /**
   * 赛事报名
   */

export const getEventOrders = () => get(`/h5/event/listUserEventOrders?pageNum=1&pageSize=100`)

// 取消报名
export const cancelOrders = (orderId) => get(`/h5/event/cancelUserEventOrders?orderId=${orderId}`)

